package client;

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

import com.test.webservice.IHelloWorld;

public class ClientWithoutSpring {
	public static void main(String[] args) {
		JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
		// 要提供服务端的接口
		factory.setServiceClass(IHelloWorld.class);
		factory.setAddress("http://localhost:8080/webservice/helloWorld?wsdl");
		IHelloWorld hw = (IHelloWorld) factory.create();
		System.out.println(hw.sayHello("John"));
		System.out.println(hw.plus(1, 2));
	}
}
